package com.xique.client.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xique.client.bean.domain.PayOrder;
import org.apache.ibatis.annotations.Param;

/**
 * @author shd
 * @create 2021/11/4 10:16
 */
public interface PayOrderMapper extends BaseMapper<PayOrder> {

    /**
     * 统计电子支付金额
     * @author shd
     * @date 2021/11/4 10:42
     * @param parkId
     * @return java.lang.Long
     */
    Double selectElectronicStatistic(Long parkId);

    /**
     * 统计现金收费金额
     * @author shd
     * @date 2021/11/4 10:42
     * @param parkId
     * @return java.lang.Long
     */
    Double selectCashStatistic(Long parkId);

    /**
     * 统计现金收费金额
     * @author shd
     * @date 2021/11/4 10:42
     * @param parkId 项目id
     * @param userId 管理员用户id
     * @return java.lang.Long
     */
    Double selectCashStatisticByUserId(@Param("parkId") Long parkId, @Param("userId") Long userId);

    /**
     * 统计未收金额
     * @author shd
     * @date 2021/11/4 10:42
     * @param parkId
     * @return java.lang.Long
     */
    Double selectWaitStatistic(Long parkId);

    /**
     * 统计免费金额
     * @author shd
     * @date 2021/11/4 10:42
     * @param parkId
     * @return java.lang.Long
     */
    Double selectFreeStatistic(Long parkId);

    /**
     * 统计免费金额
     * @author shd
     * @date 2021/11/9 10:00
     * @param parkId
     * @param userId 管理员用户id
     * @return java.lang.Double
     */
    Double selectFreeStatisticByUserId(@Param("parkId") Long parkId, @Param("userId") Long userId);

}
